#include "mof_checksum_app.h"

uint16_t GetCheckSum16(uint8_t* database, uint8_t length,uint16_t checksum) 
{ 
//	uint16_t checksum=0; 
	while(length--) 
	{ 
		checksum += *database++; 
	} 
	return checksum;
} 

uint8_t GetCheckSum8(uint8_t* database, uint8_t length,uint8_t checksum) 
{ 
	//uint8_t checksum=0; 
	while(length--) 
	{ 
		checksum += *database++; 
	} 
	return checksum;
} 


void data_char_fix(uint8_t* database,uint8_t length,uint8_t dat)
{
	while(length--) 
	{ 
		(*database)=dat; 
		database++;
	} 
}

